<div id="page-wrapper">
    <!-- /.row -->
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="judul-page">Daftar Siswa Belum Set Tarif Pembayaran Tahunan</span>
                    
                    <div class="clearfix"></div>
                </div>
                <div class="panel-body">
				<?php
$flashmessage = $this->session->flashdata('pesan');
	//echo ! empty($flashmessage) ? '<div class="valid_box">' . $flashmessage . '</div>': '';
if(! empty($flashmessage)){
?>
<div class="alert alert-success">
    <span class="glyphicon glyphicon-ok"></span>&nbsp;&nbsp;<?php echo $flashmessage;?>
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
<?php
}
?>
				<form class="form-inline" role="form" method="post" action="<?php echo site_url($aksi_simpan);?>">    
                  <div class="row margin-bottom10">
                    
                      <div class="col-md-4">
                        <div class="input-group input-group-sm">
                          <button type="submit" class="btn btn-primary btn-sm">Simpan</button>
                        </div>
                      </div>
                    
                  </div>
                    <div class="table-responsive">
                      <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>No</th>
								<th>Lembaga</th>
                                <th>NIS</th>
                                <th>NVA</th>
                                <th>Nama Lengkap</th>
                                <th>Tapel Masuk</th>
                                <th>Tagihan</th>
                                
                            </tr>
                        </thead>
                        <tbody>
						<?php 
							if(count($hasil)>0){
								$i = 1; 
								foreach ($hasil as $row) {
						?>										
                            <tr>
                                <td><?php echo $i ?></td>
								<td><?php echo $row['nama_lembaga']; ?>
                                <td><?php echo $row['nva']; ?>
								<input type="hidden" name="nis[<?php echo $i?>]" value="<?php echo $row['nis']; ?>" />
								<input type="hidden" name="id_lembaga[<?php echo $i?>]" value="<?php echo $row['id_lembaga']; ?>" />
								</td> 
                                <td><?php echo $row['nis']; ?></td> 
                                <td><?php echo $row['nm_lengkap']; ?></td> 
                                <td><?php echo $row['th_ajaran']; ?></td> 
                                <td><?php 
								
								if(!empty($row['list_tagihan'])){
									$status_simpan="ya";
									echo "<table style='width:200px;'>";
									foreach($row['list_tagihan'] as $val_tagihan){
										echo "<tr><td>".$val_tagihan['nama_komp']."</td>
											<td>".number_format($val_tagihan['nominal'],0,",",".")."</td></tr>";
									}
									echo "</table>";
								}else{
									$status_simpan="tidak";
									echo "Tagihan Belum Disetting";
								}
								?>
							<input type="hidden" name="tapel[<?php echo $i?>]" value="<?php echo $tapel_aktif; ?>" />
								<input type="hidden" name="status_simpan[<?php echo $i?>]" value="<?php echo $status_simpan; ?>" />
								</td> 
                                
                            </tr>
						<?php
							$i++;
								}
							}else{
						?>
							<tr>
                                <td colspan="6"><center>Tagihan Siswa Tidak Ada</center></td>
							</tr>
						<?php
							}
						?>
                        </tbody>
                      </table>
                    </div>
                    <div class="clearfix"></div>
                </form>
                </div>
            </div>
        </div>
    </div>
    <!-- /.row -->
</div>
<!-- /#page-wrapper -->